package us.icitap.timsportal.ejb;

import java.util.Collection;
import java.util.Date;
import java.util.List;

import javax.ejb.Local;

import us.icitap.timsportal.business.DomainUser;
import us.icitap.timsportal.business.SimpleUser;
import us.icitap.timsportal.entity.Module;
import us.icitap.timsportal.entity.Officer;
import us.icitap.timsportal.entity.OrgStructure;
import us.icitap.timsportal.entity.PortalSession;
import us.icitap.timsportal.entity.Role;
import us.icitap.timsportal.entity.User;

@Local
public interface PortalBeanLocal {
	
	public void foo();

	//User
	User getUserEntity(String username);	
	//User getUserDomain(String username, String password);	
	User saveUser(User user);	
	SimpleUser getModuleUser(String portalSessionId, String moduleSessionId);
	String getModuleUsername(String portalSessionId, String moduleSessionId);
	Officer getRmisOfficerById(String officerId);
	List<Officer> getRmisOfficerByName(String name, String surname);
	User getUserLastUpdatedDettails(String username);
	List<OrgStructure> getRmisOrgStructureList(String arg);
	
	//Lists
	Date getSysdate();
	List<Module> getListModule(boolean all);	
	//List<User> getUserList(String username ,OrgStructure os);
	List<OrgStructure> getListOrgStructure();
	//Set<Role> getRoleListByModule(Module m);	

	//PortalSession
	public void savePortalSession(PortalSession portalSession);
	PortalSession searchPortalSessionInDB(String username,
			String portalSessionId, String moduleSessionId);
	PortalSession searchPortalSessionInDB(String portalSessionId);
	PortalSession searchPortalSessionInDB(String portalSessionId,
			String moduleSessionId);
	Role getRole(String id);
	Officer getDBOfficerById(String id);
	
	Module saveModule(Module m, Collection<Role> rCol, Collection<OrgStructure> osCol);
	
}
